package com.wicket.okrbff.biz.service.impl;

import cn.hutool.core.bean.BeanUtil;
import com.wicket.okrapp.integration.dto.CycleDto;
import com.wicket.okrbff.biz.service.OrgDictionaryService;
import com.wicket.okrbff.biz.service.dto.common.*;
import com.wicket.okrbff.biz.service.dto.req.*;
import com.wicket.okrbff.biz.service.dto.res.*;
import com.wicket.okrbff.common.util.CommonFunctionHelper;
import com.wicket.okrbff.common.util.RedisUtil;
import com.wicket.okrframework.integration.FwBaseInductionRecordClient;
import com.wicket.okrframework.integration.FwBaseOrgDictionaryClient;
import com.wicket.okrframework.integration.FwBasePositionClient;
import com.wicket.okrframework.integration.dto.*;
import org.apache.skywalking.apm.toolkit.trace.Tag;
import org.apache.skywalking.apm.toolkit.trace.Tags;
import org.apache.skywalking.apm.toolkit.trace.Trace;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.stream.Collectors;
import com.wicket.okrbff.common.exception.Assert;
import com.wicket.okrapp.integration.FwAppCycleTypeClient;
import com.wicket.okrapp.integration.dto.BatchQueryCycleComRespDto;
import com.wicket.okrapp.integration.dto.BatchQueryCycleComReqDto;
import cn.hutool.core.collection.CollectionUtil;
import com.wicket.okrbff.common.dto.TreeNode;
import java.util.ArrayList;
import java.util.List;

/**
 * @author ：
 * @date ：
 *
 *
 * @version 1.0
 */
@Service
public class OrgDictionaryServiceImpl implements OrgDictionaryService {

    @Resource
    FwBaseOrgDictionaryClient orgDictionaryClient;
    @Resource
    FwBaseOrgDictionaryClient fwBaseOrgDictionaryClient;
    @Resource
    FwBasePositionClient fwBasePositionClient;
    @Resource
    FwBaseInductionRecordClient fwBaseInductionRecordClient;
    @Resource
    private RedisUtil redisUtil;
@Resource
  FwAppCycleTypeClient fwAppCycleTypeClient;

    /**
   * B1-3查部门类型数据字典列表（边界）[1656]
   * gen by moon at 9/19/2022, 7:27:55 PM
   */
    @Trace(operationName = "B1-3查部门类型数据字典列表（边界）")
    @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Override
  public BffQueryDeptClassListBorderRespDto queryDeptClassListBorder(BffQueryDeptClassListBorderReqDto reqDto){
      
       
       QueryOrgClassListRespDto queryOrgClassListRespDto_1 =null;
//步骤0: D1-3查组织架构类型字典列表 - queryOrgClassList
     QueryOrgClassListRespDto queryOrgClassListRespDto = null;
    QueryOrgClassListReqDto queryOrgClassListReqDto=new QueryOrgClassListReqDto();
  queryOrgClassListReqDto.setPurposeCode("DEPT_TYPE");//sourceId:49029_1
queryOrgClassListReqDto.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:49031_1
if(reqDto!=null){
      queryOrgClassListReqDto.setOrganizationId(reqDto.getOrganizationId());//sourceId:49032_1
    }
  
    /*D1-3查组织架构类型字典列表[1337]   */
    Assert.isNull(queryOrgClassListReqDto.getPurposeCode(),"B1-3查部门类型数据字典列表（边界）-D1-3查组织架构类型字典列表-类型用途编码不能为空",false);
Assert.isNull(queryOrgClassListReqDto.getSubjectLifeCycle(),"B1-3查部门类型数据字典列表（边界）-D1-3查组织架构类型字典列表-主体生命周期不能为空",false);
Assert.isNull(queryOrgClassListReqDto.getOrganizationId(),"B1-3查部门类型数据字典列表（边界）-D1-3查组织架构类型字典列表-组织ID不能为空",false);
      queryOrgClassListRespDto = fwBaseOrgDictionaryClient.queryOrgClassList(queryOrgClassListReqDto).getData();
      
      
      queryOrgClassListRespDto_1 = queryOrgClassListRespDto;
    
BffQueryDeptClassListBorderRespDto retData = new BffQueryDeptClassListBorderRespDto();
  if(queryOrgClassListRespDto_1!=null){
      retData.setOrgClassList(queryOrgClassListRespDto_1.getOrgClassList().stream().map(item -> BeanUtil.toBean(item, BffOrgClassDto.class)).collect(Collectors.toList()));//sourceId:49663_1
    }
  

  
  
return retData;
  }

    /**
   * B1-3查询组织架构类型字典列表（边界）[1092]
   * gen by moon at 10/23/2022, 12:09:06 AM
   */
    @Trace(operationName = "B1-3查询组织架构类型字典列表（边界）")
    @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Override
  public BffQueryOrgClassListBorderRespDto queryOrgClassListBorder(BffQueryOrgClassListBorderReqDto reqDto){
      
       
       QueryOrgClassListRespDto queryOrgClassListRespDto_1 =null;
//步骤0: D1-3查组织架构类型字典列表 - queryOrgClassList
     QueryOrgClassListRespDto queryOrgClassListRespDto = null;
    QueryOrgClassListReqDto queryOrgClassListReqDto=new QueryOrgClassListReqDto();
  queryOrgClassListReqDto.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:35947_1
if(reqDto!=null){
      queryOrgClassListReqDto.setPurposeCode(reqDto.getPurposeCode());//SimpleFieldAssign//sourceId:35944_1
queryOrgClassListReqDto.setOrganizationId(reqDto.getOrganizationId());//SimpleFieldAssign//sourceId:376922_1
    }
  
    /*D1-3查组织架构类型字典列表[1337]   */
    Assert.isNull(queryOrgClassListReqDto.getPurposeCode(),"B1-3查询组织架构类型字典列表（边界）-D1-3查组织架构类型字典列表-类型用途编码不能为空",false);
Assert.isNull(queryOrgClassListReqDto.getSubjectLifeCycle(),"B1-3查询组织架构类型字典列表（边界）-D1-3查组织架构类型字典列表-主体生命周期不能为空",false);
      queryOrgClassListRespDto = fwBaseOrgDictionaryClient.queryOrgClassList(queryOrgClassListReqDto).getData();
      
      
      queryOrgClassListRespDto_1 = queryOrgClassListRespDto;
    
BffQueryOrgClassListBorderRespDto retData = new BffQueryOrgClassListBorderRespDto();
  if(queryOrgClassListRespDto_1!=null){
      retData.setOrgClassList(queryOrgClassListRespDto_1.getOrgClassList().stream().map(item -> BeanUtil.toBean(item, BffOrgClassDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:35953_1
    }
  

  
  
return retData;
  }

    /**
   * B1-3查询可存档部门类型判断条件（管理）[1518]
   * gen by moon at 10/24/2022, 4:53:23 AM
   */
    @Trace(operationName = "B1-3查询可存档部门类型判断条件（管理）")
    @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Override
  public BffQueryArchiveDeptClassRespDto queryArchiveDeptClass(BffQueryArchiveDeptClassReqDto reqDto){
      
       
       QueryDeleteDeptClassListRespDto queryDeleteDeptClassListRespDto_1 =null;
//步骤0: D1-3查询可删除部门类型字典列表 - queryDeleteDeptClassList
     QueryDeleteDeptClassListRespDto queryDeleteDeptClassListRespDto = null;
    QueryDeleteDeptClassListReqDto queryDeleteDeptClassListReqDto=new QueryDeleteDeptClassListReqDto();
    queryDeleteDeptClassListReqDto.setOrganizationId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecHighestOrgID());//CURRENT_HIGH_ORGID//sourceId:42788_1

        queryDeleteDeptClassListReqDto.setSubjectLifeCycle("EDITING");//sourceId:51780_1
if(reqDto!=null){
      queryDeleteDeptClassListReqDto.setTypeDictionaryId(reqDto.getTypeDictionaryId());//SimpleFieldAssign//sourceId:42787_1
    }
  
    /*D1-3查询可删除部门类型字典列表[1526]   */
    Assert.isNull(queryDeleteDeptClassListReqDto.getTypeDictionaryId(),"B1-3查询可存档部门类型判断条件（管理）-D1-3查询可删除部门类型字典列表-部门类型字典ID不能为空",false);
Assert.isNull(queryDeleteDeptClassListReqDto.getOrganizationId(),"B1-3查询可存档部门类型判断条件（管理）-D1-3查询可删除部门类型字典列表-组织ID不能为空",false);
Assert.isNull(queryDeleteDeptClassListReqDto.getSubjectLifeCycle(),"B1-3查询可存档部门类型判断条件（管理）-D1-3查询可删除部门类型字典列表-主体生命周期不能为空",false);
      queryDeleteDeptClassListRespDto = fwBaseOrgDictionaryClient.queryDeleteDeptClassList(queryDeleteDeptClassListReqDto).getData();
      
      
      queryDeleteDeptClassListRespDto_1 = queryDeleteDeptClassListRespDto;
    
BffQueryArchiveDeptClassRespDto retData = new BffQueryArchiveDeptClassRespDto();
  if(queryDeleteDeptClassListRespDto_1!=null){
      retData.setDeptList(queryDeleteDeptClassListRespDto_1.getDeptList());//list-field-assign//sourceId:42791_1
    }
  

  
  
return retData;
  }

    /**
   * B1-3查询可存档职务类别条件（管理）[1510]
   * gen by moon at 8/10/2022, 3:35:55 AM
   */
    @Trace(operationName = "B1-3查询可存档职务类别条件（管理）")
    @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Override
  public BffQueryArchivePositionClassRespDto queryArchivePositionClass(BffQueryArchivePositionClassReqDto reqDto){
      
       
       QueryPositionListRespDto queryPositionListRespDto_1 = null;
//步骤0: D1-3查询职务列表 - queryPositionList
     QueryPositionListRespDto queryPositionListRespDto = null;
    QueryPositionListReqDto queryPositionListReqDto=new QueryPositionListReqDto();
  queryPositionListReqDto.setSubjectLifeCycle("EDITING");//sourceId:54205_1
if(reqDto!=null){
      queryPositionListReqDto.setTypeDictionaryId(reqDto.getTypeDictionaryId());//sourceId:54202_1
    }
  
    /*D1-3查询职务列表[790]   */
    Assert.isNull(queryPositionListReqDto.getTypeDictionaryId(),"B1-3查询可存档职务类别条件（管理）-D1-3查询职务列表-职务类别字典ID不能为空",false);
Assert.isNull(queryPositionListReqDto.getSubjectLifeCycle(),"B1-3查询可存档职务类别条件（管理）-D1-3查询职务列表-主体生命周期不能为空",false);
      queryPositionListRespDto = fwBasePositionClient.queryPositionList(queryPositionListReqDto).getData();
      
      queryPositionListRespDto_1 = queryPositionListRespDto;
    
BffQueryArchivePositionClassRespDto retData = new BffQueryArchivePositionClassRespDto();
  if(queryPositionListRespDto_1!=null){
      retData.setOrgPositionList(queryPositionListRespDto_1.getOrgPositionList().stream().map(item->item.getPositionId())
        .collect(Collectors.toList()));//sourceId:54222_1
    }
  

  
  
return retData;
  }

    /**
   * B1-3查询主岗就职字典列表（边界）[1341]
   * gen by moon at 12/29/2023, 7:24:57 PM
   */
    @Trace(operationName = "B1-3查询主岗就职字典列表（边界）")
    @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Override
  public BffQueryMainInductionOrgClassListRespDto queryMainInductionOrgClassList(BffQueryMainInductionOrgClassListReqDto reqDto){
      
       
       QueryOrgClassListRespDto queryOrgClassListRespDto_1 =null;
//步骤0: D1-3查询就职记录详情(公共)(边界) - queryInductionRecordDetailComBorder
     QueryInductionRecordDetailComBorderRespDto queryInductionRecordDetailComBorderRespDto = null;
    QueryInductionRecordDetailComBorderReqDto queryInductionRecordDetailComBorderReqDto=new QueryInductionRecordDetailComBorderReqDto();
  queryInductionRecordDetailComBorderReqDto.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:31222_1
queryInductionRecordDetailComBorderReqDto.setIsMainInduction("TRUE");//sourceId:31223_1
queryInductionRecordDetailComBorderReqDto.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:31233_1
if(reqDto!=null){
      queryInductionRecordDetailComBorderReqDto.setOriginalRoleMemberId(reqDto.getOriginalRoleMemberId());//SimpleFieldAssign//sourceId:31221_1
    }
  
    /*D1-3查询就职记录详情(公共)(边界)[1340]   */
    Assert.isNull(queryInductionRecordDetailComBorderReqDto.getOriginalRoleMemberId(),"B1-3查询主岗就职字典列表（边界）-D1-3查询就职记录详情(公共)(边界)-身份人员ID不能为空",false);
Assert.isNull(queryInductionRecordDetailComBorderReqDto.getSubjectLifeCycle(),"B1-3查询主岗就职字典列表（边界）-D1-3查询就职记录详情(公共)(边界)-主体生命周期不能为空",false);
Assert.isNull(queryInductionRecordDetailComBorderReqDto.getIsMainInduction(),"B1-3查询主岗就职字典列表（边界）-D1-3查询就职记录详情(公共)(边界)-是否主岗不能为空",false);
Assert.isNull(queryInductionRecordDetailComBorderReqDto.getSpaceId(),"B1-3查询主岗就职字典列表（边界）-D1-3查询就职记录详情(公共)(边界)-创建于空间ID不能为空",false);
      queryInductionRecordDetailComBorderRespDto = fwBaseInductionRecordClient.queryInductionRecordDetailComBorder(queryInductionRecordDetailComBorderReqDto).getData()/*vcase invoke 跨dubbo调用;*/;

      
      
    
//步骤1: D1-3查组织架构类型字典列表 - queryOrgClassList
     QueryOrgClassListRespDto queryOrgClassListRespDto = null;
    QueryOrgClassListReqDto queryOrgClassListReqDto=new QueryOrgClassListReqDto();
  if(reqDto!=null){
      queryOrgClassListReqDto.setPurposeCode(reqDto.getPurposeCode());//SimpleFieldAssign//sourceId:31219_1
    }
  
    /*D1-3查组织架构类型字典列表[1337]   */
    Assert.isNull(queryOrgClassListReqDto.getPurposeCode(),"B1-3查询主岗就职字典列表（边界）-D1-3查组织架构类型字典列表-类型用途编码不能为空",false);
      queryOrgClassListRespDto = fwBaseOrgDictionaryClient.queryOrgClassList(queryOrgClassListReqDto).getData()/*vcase invoke 跨dubbo调用;*/;

      
      queryOrgClassListRespDto_1 = queryOrgClassListRespDto;
    
BffQueryMainInductionOrgClassListRespDto retData = new BffQueryMainInductionOrgClassListRespDto();
  if(queryOrgClassListRespDto_1!=null){
      retData.setOrgClassList(queryOrgClassListRespDto_1.getOrgClassList().stream().map(item -> BeanUtil.toBean(item, BffOrgClassDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:31237_1
    }
  

  
  
return retData;
  }

    /**
   * B1-3查询组织架构类型字典列表（管理）[830]
   * gen by moon at 8/17/2022, 7:39:23 PM
   */
    @Trace(operationName = "B1-3查询组织架构类型字典列表（管理）")
    @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Override
  public BffQueryOrgClassListRespDto queryOrgClassList(BffQueryOrgClassListReqDto reqDto){
      
       
       QueryOrgClassListRespDto queryOrgClassListRespDto_1 = null;
//步骤0: D1-3查组织架构类型字典列表 - queryOrgClassList
     QueryOrgClassListRespDto queryOrgClassListRespDto = null;
    QueryOrgClassListReqDto queryOrgClassListReqDto=new QueryOrgClassListReqDto();
  queryOrgClassListReqDto.setOrganizationId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecHighestOrgID());//CURRENT_HIGH_ORGID//sourceId:102895_1
if(reqDto!=null){
      queryOrgClassListReqDto.setPurposeCode(reqDto.getPurposeCode());//sourceId:102892_1
queryOrgClassListReqDto.setIsArchive(reqDto.getIsArchive());//sourceId:102899_1
    }
  
    /*D1-3查组织架构类型字典列表[1337]   */
    Assert.isNull(queryOrgClassListReqDto.getPurposeCode(),"B1-3查询组织架构类型字典列表（管理）-D1-3查组织架构类型字典列表-类型用途编码不能为空",false);
Assert.isNull(queryOrgClassListReqDto.getIsArchive(),"B1-3查询组织架构类型字典列表（管理）-D1-3查组织架构类型字典列表-是否存档不能为空",false);
Assert.isNull(queryOrgClassListReqDto.getOrganizationId(),"B1-3查询组织架构类型字典列表（管理）-D1-3查组织架构类型字典列表-组织ID不能为空",false);
      queryOrgClassListRespDto = fwBaseOrgDictionaryClient.queryOrgClassList(queryOrgClassListReqDto).getData();
      
      queryOrgClassListRespDto_1 = queryOrgClassListRespDto;
    
BffQueryOrgClassListRespDto retData = new BffQueryOrgClassListRespDto();
  if(queryOrgClassListRespDto_1!=null){
      retData.setOrgClassList(queryOrgClassListRespDto_1.getOrgClassList().stream().map(item -> BeanUtil.toBean(item, BffOrgClassDto.class)).collect(Collectors.toList()));//sourceId:102898_1
    }
  

  retData.setPageNum(queryOrgClassListRespDto.getPageNum());
        retData.setPageSize(queryOrgClassListRespDto.getPageSize());
        retData.setTotal(queryOrgClassListRespDto.getTotalNum());
        retData.setIsLastPage((Math.ceil(Double.valueOf(queryOrgClassListRespDto.getTotalNum()) / Double.valueOf(queryOrgClassListRespDto.getPageSize()))) <= retData.getPageNum());
        
  
return retData;
  }

    /**
     * B1-3删除部门类型字典(管理)
     */
    @Trace(operationName = "B1-3删除部门类型字典(管理)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffDeleteDeptClassRespDto deleteDeptClass(BffDeleteDeptClassReqDto reqDto) {


        //步骤0: D1-3删除组织架构类型字典 - deleteOrgClass
        DeleteOrgClassRespDto deleteOrgClassRespDto = null;
        DeleteOrgClassReqDto deleteOrgClassReqDto = new DeleteOrgClassReqDto();
        if (reqDto != null) {
            deleteOrgClassReqDto.setTypeDictionaryId(reqDto.getTypeDictionaryId());//sourceId:40015_1
        }

        /*D1-3删除组织架构类型字典[822]   */
        deleteOrgClassRespDto = fwBaseOrgDictionaryClient.deleteOrgClass(deleteOrgClassReqDto).getData();


        BffDeleteDeptClassRespDto retData = new BffDeleteDeptClassRespDto();


        return retData;
    }

    /**
   * B1-3修改组织架构类型字典（管理）[826]
   * gen by moon at 4/2/2024, 11:59:30 PM
   */
    @Trace(operationName = "B1-3修改组织架构类型字典（管理）")
    @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Override
  public BffUpdateOrgClassRespDto updateOrgClass(BffUpdateOrgClassReqDto reqDto){
      
       
       //步骤0: D1-3修改组织架构类型字典 - updateOrgClass
     UpdateOrgClassRespDto updateOrgClassRespDto = null;
    UpdateOrgClassReqDto updateOrgClassReqDto=new UpdateOrgClassReqDto();
  if(reqDto!=null){
      updateOrgClassReqDto.setTypeDictionaryId(reqDto.getTypeDictionaryId());//SimpleFieldAssign//sourceId:39973_1
updateOrgClassReqDto.setTypeDictionaryName(reqDto.getTypeDictionaryName());//SimpleFieldAssign//sourceId:39975_1
updateOrgClassReqDto.setTypeDictionaryCode(reqDto.getTypeDictionaryCode());//SimpleFieldAssign//sourceId:39974_1
updateOrgClassReqDto.setIsSystemData(reqDto.getIsSystemData());//SimpleFieldAssign//sourceId:1688225_1
updateOrgClassReqDto.setDeptBusinessIdentityList(reqDto.getDeptBusinessIdentityList());//list-field-assign//sourceId:1689823_1
updateOrgClassReqDto.setOrderNumber(reqDto.getOrderNumber());//SimpleFieldAssign//sourceId:39976_1
updateOrgClassReqDto.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:51617_1
    }
  
    /*D1-3修改组织架构类型字典[821]   */
    Assert.isNull(updateOrgClassReqDto.getTypeDictionaryId(),"B1-3修改组织架构类型字典（管理）-D1-3修改组织架构类型字典-类型字典ID不能为空",false);
      updateOrgClassRespDto = fwBaseOrgDictionaryClient.updateOrgClass(updateOrgClassReqDto).getData()/*vcase invoke 跨dubbo调用;*/;

      
      
    
BffUpdateOrgClassRespDto retData = new BffUpdateOrgClassRespDto();
  
  

  
  
return retData;
  }

    /**
   * B1-3新增组织架构类型字典（管理）[825]
   * gen by moon at 4/2/2024, 11:59:27 PM
   */
    @Trace(operationName = "B1-3新增组织架构类型字典（管理）")
    @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Override
  public BffAddOrgClassRespDto addOrgClass(BffAddOrgClassReqDto reqDto){
      
       
       AddOrgClassRespDto addOrgClassRespDto_1 = null;
//步骤0: D1-3新增组织架构类型字典 - addOrgClass
     AddOrgClassRespDto addOrgClassRespDto = null;
    AddOrgClassReqDto addOrgClassReqDto=new AddOrgClassReqDto();
  if(reqDto!=null){
      addOrgClassReqDto.setPurposeCode(reqDto.getPurposeCode());//SimpleFieldAssign//sourceId:39944_1
addOrgClassReqDto.setTypeDictionaryCode(reqDto.getTypeDictionaryCode());//SimpleFieldAssign//sourceId:39946_1
addOrgClassReqDto.setTypeDictionaryName(reqDto.getTypeDictionaryName());//SimpleFieldAssign//sourceId:39947_1
addOrgClassReqDto.setOrganizationId(reqDto.getOrganizationId());//SimpleFieldAssign//sourceId:54398_1
addOrgClassReqDto.setOrderNumber(reqDto.getOrderNumber());//SimpleFieldAssign//sourceId:39948_1
addOrgClassReqDto.setDeptBusinessIdentityList(reqDto.getDeptBusinessIdentityList());//list-field-assign//sourceId:1689564_1
addOrgClassReqDto.setIsSystemData(reqDto.getIsSystemData());//SimpleFieldAssign//sourceId:1688215_1
addOrgClassReqDto.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:51598_1
    }
  
    /*D1-3新增组织架构类型字典[820]   */
    Assert.isNull(addOrgClassReqDto.getPurposeCode(),"B1-3新增组织架构类型字典（管理）-D1-3新增组织架构类型字典-类型用途编码不能为空",false);
Assert.isNull(addOrgClassReqDto.getTypeDictionaryCode(),"B1-3新增组织架构类型字典（管理）-D1-3新增组织架构类型字典-类型字典编码不能为空",false);
Assert.isNull(addOrgClassReqDto.getTypeDictionaryName(),"B1-3新增组织架构类型字典（管理）-D1-3新增组织架构类型字典-类型字典名称不能为空",false);
Assert.isNull(addOrgClassReqDto.getOrderNumber(),"B1-3新增组织架构类型字典（管理）-D1-3新增组织架构类型字典-排序不能为空",false);
Assert.isNull(addOrgClassReqDto.getSubjectLifeCycle(),"B1-3新增组织架构类型字典（管理）-D1-3新增组织架构类型字典-主体生命周期不能为空",false);
      addOrgClassRespDto = fwBaseOrgDictionaryClient.addOrgClass(addOrgClassReqDto).getData()/*vcase invoke 跨dubbo调用;*/;

      
      addOrgClassRespDto_1 = addOrgClassRespDto;
    
BffAddOrgClassRespDto retData = new BffAddOrgClassRespDto();
  if(addOrgClassRespDto_1!=null){
      retData.setTypeDictionaryId(addOrgClassRespDto_1.getTypeDictionaryId());//SimpleFieldAssign//sourceId:39957_1
    }




return retData;
  }
/**
   * B1查询工作任务来源列表[9093]
   * gen by moon at 4/3/2024, 12:03:04 AM
   */
    @Trace(operationName = "B1查询工作任务来源列表")
    @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Override
  public BffQueryWorkTaskSourceListRespDto queryWorkTaskSourceList(BffQueryWorkTaskSourceListReqDto reqDto){


       QueryWorkTaskSourceListRespDto queryWorkTaskSourceListRespDto_1 =null;
//步骤0: D1查询工作任务来源列表 - queryWorkTaskSourceList
     QueryWorkTaskSourceListRespDto queryWorkTaskSourceListRespDto = null;
    QueryWorkTaskSourceListReqDto queryWorkTaskSourceListReqDto=new QueryWorkTaskSourceListReqDto();
  if(reqDto!=null){
      queryWorkTaskSourceListReqDto.setDeptId(reqDto.getDeptId());//SimpleFieldAssign//sourceId:1689565_1
queryWorkTaskSourceListReqDto.setOrganizationId(reqDto.getOrganizationId());//SimpleFieldAssign//sourceId:1689566_1
queryWorkTaskSourceListReqDto.setIsSystemData(reqDto.getIsSystemData());//SimpleFieldAssign//sourceId:1689567_1
    }

    /*D1查询工作任务来源列表[9089]   */

      queryWorkTaskSourceListRespDto = fwBaseOrgDictionaryClient.queryWorkTaskSourceList(queryWorkTaskSourceListReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


      queryWorkTaskSourceListRespDto_1 = queryWorkTaskSourceListRespDto;

BffQueryWorkTaskSourceListRespDto retData = new BffQueryWorkTaskSourceListRespDto();
  if(queryWorkTaskSourceListRespDto_1!=null){
      retData.setWorkTaskSourceList(//objList-to-objLists
        queryWorkTaskSourceListRespDto_1.getWorkTaskSourceList().stream().map(item -> {
      BffWorkTaskSourceDto elm = new BffWorkTaskSourceDto();
      if(item!=null){
      elm.setSourceCode(item.getTypeDictionaryCode());//SimpleFieldAssign//sourceId:332846_2
elm.setSourceName(item.getTypeDictionaryName());//SimpleFieldAssign//sourceId:332847_2
    }
        return elm;
      }).collect(Collectors.toList()));//objList-to-objLists//sourceId:1689573_1
    }




return retData;
  }
/**
   * B1查询UCD筛选工作任务来源列表[9104]
   * gen by moon at 5/11/2024, 11:58:09 PM
   */
    @Trace(operationName = "B1查询UCD筛选工作任务来源列表")
    @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Override
  public BffQueryUcdWorkTaskSourceListRespDto queryUcdWorkTaskSourceList(BffQueryUcdWorkTaskSourceListReqDto reqDto){


       QueryUcdWorkTaskSourceListRespDto queryUcdWorkTaskSourceListRespDto_1 =null;
//步骤0: D1查询UCD筛选工作任务来源列表 - queryUcdWorkTaskSourceList
     QueryUcdWorkTaskSourceListRespDto queryUcdWorkTaskSourceListRespDto = null;
    QueryUcdWorkTaskSourceListReqDto queryUcdWorkTaskSourceListReqDto=new QueryUcdWorkTaskSourceListReqDto();
  queryUcdWorkTaskSourceListReqDto.setOriginalRoleMemberId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecOriginalRoleMemberId());//CURRENT_ORIGINAL_ROLE_MEMBERID//sourceId:1691658_1
queryUcdWorkTaskSourceListReqDto.setIsSystemData("FALSE");//sourceId:1790015_1
queryUcdWorkTaskSourceListReqDto.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:1691659_1

    /*D1查询UCD筛选工作任务来源列表[9094]   */
    Assert.isNull(queryUcdWorkTaskSourceListReqDto.getOriginalRoleMemberId(),"B1查询UCD筛选工作任务来源列表-D1查询UCD筛选工作任务来源列表-身份人员ID不能为空",false);
Assert.isNull(queryUcdWorkTaskSourceListReqDto.getIsSystemData(),"B1查询UCD筛选工作任务来源列表-D1查询UCD筛选工作任务来源列表-是否系统数据不能为空",false);
Assert.isNull(queryUcdWorkTaskSourceListReqDto.getSpaceId(),"B1查询UCD筛选工作任务来源列表-D1查询UCD筛选工作任务来源列表-创建于空间ID不能为空",false);
      queryUcdWorkTaskSourceListRespDto = fwBaseOrgDictionaryClient.queryUcdWorkTaskSourceList(queryUcdWorkTaskSourceListReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


      queryUcdWorkTaskSourceListRespDto_1 = queryUcdWorkTaskSourceListRespDto;

BffQueryUcdWorkTaskSourceListRespDto retData = new BffQueryUcdWorkTaskSourceListRespDto();
  if(queryUcdWorkTaskSourceListRespDto_1!=null){
      retData.setWorkTaskSourceList(//objList-to-objLists
        queryUcdWorkTaskSourceListRespDto_1.getWorkTaskSourceList().stream().map(item -> {
      BffWorkTaskSourceDto elm = new BffWorkTaskSourceDto();
      if(item!=null){
      elm.setSourceCode(item.getTypeDictionaryCode());//SimpleFieldAssign//sourceId:332549_2
elm.setSourceName(item.getTypeDictionaryName());//SimpleFieldAssign//sourceId:332550_2
    }
        return elm;
      }).collect(Collectors.toList()));//objList-to-objLists//sourceId:1691639_1
    }
  

  
  
return retData;
  }
/**
   * B1查询工作任务来源匹配部门业务身份列表(管理)[828]
   * gen by moon at 5/11/2024, 11:57:49 PM
   */
    @Trace(operationName = "B1查询工作任务来源匹配部门业务身份列表(管理)")
    @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Override
  public BffQueryWorkTaskSourceMateDeptBusinessIdentityListRespDto queryWorkTaskSourceMateDeptBusinessIdentityList(BffQueryWorkTaskSourceMateDeptBusinessIdentityListReqDto reqDto){


       QueryWorkTaskSourceMateDeptBusinessIdentityListRespDto queryWorkTaskSourceMateDeptBusinessIdentityListRespDto_1 =null;
//步骤0: D1查询工作任务来源匹配部门业务身份列表 - queryWorkTaskSourceMateDeptBusinessIdentityList
     QueryWorkTaskSourceMateDeptBusinessIdentityListRespDto queryWorkTaskSourceMateDeptBusinessIdentityListRespDto = null;
    QueryWorkTaskSourceMateDeptBusinessIdentityListReqDto queryWorkTaskSourceMateDeptBusinessIdentityListReqDto=new QueryWorkTaskSourceMateDeptBusinessIdentityListReqDto();
  if(reqDto!=null){
      queryWorkTaskSourceMateDeptBusinessIdentityListReqDto.setThemeCode(reqDto.getThemeCode());//SimpleFieldAssign//sourceId:1790307_1
    }

    /*D1查询工作任务来源匹配部门业务身份列表[9547]   */
    Assert.isNull(queryWorkTaskSourceMateDeptBusinessIdentityListReqDto.getThemeCode(),"B1查询工作任务来源匹配部门业务身份列表(管理)-D1查询工作任务来源匹配部门业务身份列表-主题标识不能为空",false);
      queryWorkTaskSourceMateDeptBusinessIdentityListRespDto = fwBaseOrgDictionaryClient.queryWorkTaskSourceMateDeptBusinessIdentityList(queryWorkTaskSourceMateDeptBusinessIdentityListReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


      queryWorkTaskSourceMateDeptBusinessIdentityListRespDto_1 = queryWorkTaskSourceMateDeptBusinessIdentityListRespDto;

BffQueryWorkTaskSourceMateDeptBusinessIdentityListRespDto retData = new BffQueryWorkTaskSourceMateDeptBusinessIdentityListRespDto();
  if(queryWorkTaskSourceMateDeptBusinessIdentityListRespDto_1!=null){
      retData.setDeptBusinessIdentityList(queryWorkTaskSourceMateDeptBusinessIdentityListRespDto_1.getDeptBusinessIdentityList().stream().map(item -> BeanUtil.toBean(item, BffDeptBusinessIdentityDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:1790310_1
    }




return retData;
  }
/**
   * B1查询任务分类列表(管理)[10033]
   * gen by moon at 10/3/2024, 2:23:14 PM
   */
    @Trace(operationName = "B1查询任务分类列表(管理)")
    @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Override
  public BffQueryTaskCategoriesListRespDto queryTaskCategoriesList(BffQueryTaskCategoriesListReqDto reqDto){


       QueryTaskCategoriesListComRespDto queryTaskCategoriesListComRespDto_1 =null;
BatchQueryCycleComRespDto batchQueryCycleComRespDto_1 =null;
//步骤0: D1查询任务分类列表(公共) - queryTaskCategoriesListCom
     QueryTaskCategoriesListComRespDto queryTaskCategoriesListComRespDto = null;
    QueryTaskCategoriesListComReqDto queryTaskCategoriesListComReqDto=new QueryTaskCategoriesListComReqDto();
  queryTaskCategoriesListComReqDto.setIsSystemData("FALSE");//sourceId:1950904_1
queryTaskCategoriesListComReqDto.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:1950909_1
if(reqDto!=null){
      queryTaskCategoriesListComReqDto.setTypeDictionaryName(reqDto.getTypeDictionaryName());//SimpleFieldAssign//sourceId:1950902_1
queryTaskCategoriesListComReqDto.setThemeCode(reqDto.getThemeCode());//SimpleFieldAssign//sourceId:1950905_1
queryTaskCategoriesListComReqDto.setIsArchive(reqDto.getIsArchive());//SimpleFieldAssign//sourceId:1950907_1
    }

    /*D1查询任务分类列表(公共)[10030]   */
    Assert.isNull(queryTaskCategoriesListComReqDto.getThemeCode(),"B1查询任务分类列表(管理)-D1查询任务分类列表(公共)-主题标识不能为空",false);
Assert.isNull(queryTaskCategoriesListComReqDto.getIsArchive(),"B1查询任务分类列表(管理)-D1查询任务分类列表(公共)-是否存档不能为空",false);
Assert.isNull(queryTaskCategoriesListComReqDto.getIsSystemData(),"B1查询任务分类列表(管理)-D1查询任务分类列表(公共)-是否系统数据不能为空",false);
Assert.isNull(queryTaskCategoriesListComReqDto.getSpaceId(),"B1查询任务分类列表(管理)-D1查询任务分类列表(公共)-创建于空间ID不能为空",false);
      queryTaskCategoriesListComRespDto = fwBaseOrgDictionaryClient.queryTaskCategoriesListCom(queryTaskCategoriesListComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


      queryTaskCategoriesListComRespDto_1 = queryTaskCategoriesListComRespDto;

//步骤1: D3批量查询周期(公共) - batchQueryCycleCom
     BatchQueryCycleComRespDto batchQueryCycleComRespDto = null;
    if(queryTaskCategoriesListComRespDto !=null){
          BatchQueryCycleComReqDto batchQueryCycleComReqDto=new BatchQueryCycleComReqDto();
  if(queryTaskCategoriesListComRespDto!= null&&  queryTaskCategoriesListComRespDto.getTaskCategoriesList() !=null&& !CollectionUtil.isEmpty(queryTaskCategoriesListComRespDto.getTaskCategoriesList())){
      batchQueryCycleComReqDto.setCycleList(queryTaskCategoriesListComRespDto.getTaskCategoriesList().stream().map(item->item.getThemeCode())
        .collect(Collectors.toList()));/*list-to-strings*///sourceId:1950917_1
    }

    /*D3批量查询周期(公共)[8854]   */

      batchQueryCycleComRespDto = fwAppCycleTypeClient.batchQueryCycleCom(batchQueryCycleComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


      batchQueryCycleComRespDto_1 = batchQueryCycleComRespDto;
           }

BffQueryTaskCategoriesListRespDto retData = new BffQueryTaskCategoriesListRespDto();
  //数据集融合  MoreListToOneSource
        if(queryTaskCategoriesListComRespDto_1!= null && !CollectionUtil.isEmpty(queryTaskCategoriesListComRespDto_1.getTaskCategoriesList()) ){
          for (TaskCategoriesDto taskCategoriesDto : queryTaskCategoriesListComRespDto_1.getTaskCategoriesList()) {
              BffTaskCategoriesDto retElm = new BffTaskCategoriesDto();
             if(queryTaskCategoriesListComRespDto_1!=null){
      retElm.setTypeDictionaryId(taskCategoriesDto.getTypeDictionaryId());//SimpleFieldAssign//sourceId:399810_2
retElm.setParentTypeDictionaryCode(taskCategoriesDto.getParentTypeDictionaryCode());//SimpleFieldAssign//sourceId:421649_2
retElm.setTypeDictionaryCode(taskCategoriesDto.getTypeDictionaryCode());//SimpleFieldAssign//sourceId:399811_2
retElm.setTypeDictionaryName(taskCategoriesDto.getTypeDictionaryName());//SimpleFieldAssign//sourceId:399812_2
retElm.setPurposeCode(taskCategoriesDto.getPurposeCode());//SimpleFieldAssign//sourceId:399813_2
retElm.setOrganizationId(taskCategoriesDto.getOrganizationId());//SimpleFieldAssign//sourceId:399814_2
retElm.setThemeCode(taskCategoriesDto.getThemeCode());//SimpleFieldAssign//sourceId:399815_2
retElm.setIsSystemData(taskCategoriesDto.getIsSystemData());//SimpleFieldAssign//sourceId:399816_2
retElm.setOrderNumber(taskCategoriesDto.getOrderNumber());//SimpleFieldAssign//sourceId:399817_2
retElm.setOperationInductionId(taskCategoriesDto.getOperationInductionId());//SimpleFieldAssign//sourceId:399818_2
retElm.setOperateTime(taskCategoriesDto.getOperateTime());//SimpleFieldAssign//sourceId:399819_2
retElm.setSubjectLifeCycle(taskCategoriesDto.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:399820_2
    }
              retData.getTaskCategoriesList().add(retElm);
               if(batchQueryCycleComRespDto_1!= null){
          for (CycleDto cycleDto : batchQueryCycleComRespDto_1.getCycleList()) {
                if (cycleDto.getCycleId().equals(taskCategoriesDto.getThemeCode())) {
                 if(batchQueryCycleComRespDto_1!=null){
      retElm.setCycleStandardName(cycleDto.getCycleStandardName());//SimpleFieldAssign//sourceId:399838_2
    }
                }
            }
          }

          }
        }//sourceId:1950916_1




      List<Object> allNodes =new ArrayList<>();
      allNodes.addAll(retData.getTaskCategoriesList());
     List<TreeNode> nodeList = CommonFunctionHelper.buildTree(allNodes);
     retData.setTreeNode(nodeList);
     retData.setTaskCategoriesList(null);

return retData;
  }
/**
   * B1存档任务分类(管理)[10036]
   * gen by moon at 7/24/2024, 3:19:38 AM
   */
    @Trace(operationName = "B1存档任务分类(管理)")
    @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Override
  public BffArchiveTaskCategoriesRespDto archiveTaskCategories(BffArchiveTaskCategoriesReqDto reqDto){


       //步骤0: D1存档任务分类业务处理 - archiveTaskCategoriesBusinessHandle
     ArchiveTaskCategoriesBusinessHandleRespDto archiveTaskCategoriesBusinessHandleRespDto = null;
    ArchiveTaskCategoriesBusinessHandleReqDto archiveTaskCategoriesBusinessHandleReqDto=new ArchiveTaskCategoriesBusinessHandleReqDto();
  archiveTaskCategoriesBusinessHandleReqDto.setLifecyCycleOperationType("ARCHIVE");//sourceId:1951237_1
if(reqDto!=null){
      archiveTaskCategoriesBusinessHandleReqDto.setTypeDictionaryId(reqDto.getTypeDictionaryId());//SimpleFieldAssign//sourceId:1951236_1
    }

    /*D1存档任务分类业务处理[10034]   */
    Assert.isNull(archiveTaskCategoriesBusinessHandleReqDto.getTypeDictionaryId(),"B1存档任务分类(管理)-D1存档任务分类业务处理-类型字典ID不能为空",false);
Assert.isNull(archiveTaskCategoriesBusinessHandleReqDto.getLifecyCycleOperationType(),"B1存档任务分类(管理)-D1存档任务分类业务处理-生命周期操作类型不能为空",false);
      archiveTaskCategoriesBusinessHandleRespDto = fwBaseOrgDictionaryClient.archiveTaskCategoriesBusinessHandle(archiveTaskCategoriesBusinessHandleReqDto).getData()/*vcase invoke 跨dubbo调用;*/;




BffArchiveTaskCategoriesRespDto retData = new BffArchiveTaskCategoriesRespDto();





return retData;
  }
/**
   * B1删除任务分类(管理)[10039]
   * gen by moon at 7/24/2024, 3:19:45 AM
   */
    @Trace(operationName = "B1删除任务分类(管理)")
    @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Override
  public BffDeleteTaskCategoriesRespDto deleteTaskCategories(BffDeleteTaskCategoriesReqDto reqDto){


       //步骤0: D1删除任务分类业务处理 - deleteTaskCategoriesBusinessHandle
     DeleteTaskCategoriesBusinessHandleRespDto deleteTaskCategoriesBusinessHandleRespDto = null;
    DeleteTaskCategoriesBusinessHandleReqDto deleteTaskCategoriesBusinessHandleReqDto=new DeleteTaskCategoriesBusinessHandleReqDto();
  deleteTaskCategoriesBusinessHandleReqDto.setLifecyCycleOperationType("DELETE");//sourceId:1951560_1
if(reqDto!=null){
      deleteTaskCategoriesBusinessHandleReqDto.setTypeDictionaryId(reqDto.getTypeDictionaryId());//SimpleFieldAssign//sourceId:1951559_1
    }

    /*D1删除任务分类业务处理[10037]   */
    Assert.isNull(deleteTaskCategoriesBusinessHandleReqDto.getTypeDictionaryId(),"B1删除任务分类(管理)-D1删除任务分类业务处理-类型字典ID不能为空",false);
Assert.isNull(deleteTaskCategoriesBusinessHandleReqDto.getLifecyCycleOperationType(),"B1删除任务分类(管理)-D1删除任务分类业务处理-生命周期操作类型不能为空",false);
      deleteTaskCategoriesBusinessHandleRespDto = fwBaseOrgDictionaryClient.deleteTaskCategoriesBusinessHandle(deleteTaskCategoriesBusinessHandleReqDto).getData()/*vcase invoke 跨dubbo调用;*/;




BffDeleteTaskCategoriesRespDto retData = new BffDeleteTaskCategoriesRespDto();





return retData;
  }
/**
   * B1修改任务分类(管理)[10042]
   * gen by moon at 7/24/2024, 3:19:53 AM
   */
    @Trace(operationName = "B1修改任务分类(管理)")
    @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Override
  public BffUpdateTaskCategoriesRespDto updateTaskCategories(BffUpdateTaskCategoriesReqDto reqDto){


       //步骤0: D1修改任务分类业务处理 - updateTaskCategoriesBusinessHandle
     UpdateTaskCategoriesBusinessHandleRespDto updateTaskCategoriesBusinessHandleRespDto = null;
    UpdateTaskCategoriesBusinessHandleReqDto updateTaskCategoriesBusinessHandleReqDto=new UpdateTaskCategoriesBusinessHandleReqDto();
  if(reqDto!=null){
      updateTaskCategoriesBusinessHandleReqDto.setTypeDictionaryId(reqDto.getTypeDictionaryId());//SimpleFieldAssign//sourceId:1951872_1
updateTaskCategoriesBusinessHandleReqDto.setTypeDictionaryName(reqDto.getTypeDictionaryName());//SimpleFieldAssign//sourceId:1951873_1
updateTaskCategoriesBusinessHandleReqDto.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:1951874_1
    }

    /*D1修改任务分类业务处理[10040]   */
    Assert.isNull(updateTaskCategoriesBusinessHandleReqDto.getTypeDictionaryId(),"B1修改任务分类(管理)-D1修改任务分类业务处理-类型字典ID不能为空",false);
      updateTaskCategoriesBusinessHandleRespDto = fwBaseOrgDictionaryClient.updateTaskCategoriesBusinessHandle(updateTaskCategoriesBusinessHandleReqDto).getData()/*vcase invoke 跨dubbo调用;*/;




BffUpdateTaskCategoriesRespDto retData = new BffUpdateTaskCategoriesRespDto();





return retData;
  }
/**
   * B1查询任务分类主题列表(边界)[10044]
   * gen by moon at 7/25/2024, 1:49:07 AM
   */
    @Trace(operationName = "B1查询任务分类主题列表(边界)")
    @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Override
  public BffQueryTaskCategoriesThemeListBorderRespDto queryTaskCategoriesThemeListBorder(BffQueryTaskCategoriesThemeListBorderReqDto reqDto){


       QueryTaskCategoriesThemeListRespDto queryTaskCategoriesThemeListRespDto_1 =null;
BatchQueryCycleComRespDto batchQueryCycleComRespDto_1 =null;
//步骤0: D1查询任务分类主题列表 - queryTaskCategoriesThemeList
     QueryTaskCategoriesThemeListRespDto queryTaskCategoriesThemeListRespDto = null;
    QueryTaskCategoriesThemeListReqDto queryTaskCategoriesThemeListReqDto=new QueryTaskCategoriesThemeListReqDto();


    /*D1查询任务分类主题列表[10043]   */

      queryTaskCategoriesThemeListRespDto = fwBaseOrgDictionaryClient.queryTaskCategoriesThemeList(queryTaskCategoriesThemeListReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


      queryTaskCategoriesThemeListRespDto_1 = queryTaskCategoriesThemeListRespDto;

//步骤1: D3批量查询周期(公共) - batchQueryCycleCom
     BatchQueryCycleComRespDto batchQueryCycleComRespDto = null;
    if(queryTaskCategoriesThemeListRespDto !=null){
          BatchQueryCycleComReqDto batchQueryCycleComReqDto=new BatchQueryCycleComReqDto();
  if(queryTaskCategoriesThemeListRespDto!=null){
      batchQueryCycleComReqDto.setCycleList(queryTaskCategoriesThemeListRespDto.getTaskCategoriesList());//list-field-assign//sourceId:1952153_1
    }

    /*D3批量查询周期(公共)[8854]   */

      batchQueryCycleComRespDto = fwAppCycleTypeClient.batchQueryCycleCom(batchQueryCycleComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


      batchQueryCycleComRespDto_1 = batchQueryCycleComRespDto;
           }

BffQueryTaskCategoriesThemeListBorderRespDto retData = new BffQueryTaskCategoriesThemeListBorderRespDto();
  //数据集融合  MoreListToOneSource
        if(queryTaskCategoriesThemeListRespDto_1!= null && !CollectionUtil.isEmpty(queryTaskCategoriesThemeListRespDto_1.getTaskCategoriesList()) ){
          for (String string : queryTaskCategoriesThemeListRespDto_1.getTaskCategoriesList()) {
              BffTaskCategoriesThemeDto retElm = new BffTaskCategoriesThemeDto();
             if(queryTaskCategoriesThemeListRespDto_1!=null){
      retElm.setThemeCode(string);//SimpleFieldAssign//sourceId:400738_2
    }
              retData.getTaskCategoriesThemeList().add(retElm);
               if(batchQueryCycleComRespDto_1!= null){
          for (CycleDto cycleDto : batchQueryCycleComRespDto_1.getCycleList()) {
                if (cycleDto.getCycleId().equals(string)) {
                 if(batchQueryCycleComRespDto_1!=null){
      retElm.setCycleStandardName(cycleDto.getCycleStandardName());//SimpleFieldAssign//sourceId:400739_2
    }
                }
            }
          }

          }
        }//sourceId:1953794_1




return retData;
  }
/**
   * B1新增任务分类(管理)[10045]
   * gen by moon at 7/24/2024, 3:20:08 AM
   */
    @Trace(operationName = "B1新增任务分类(管理)")
    @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Override
  public BffAddTaskCategoriesRespDto addTaskCategories(BffAddTaskCategoriesReqDto reqDto){


       AddTaskCategoriesBusinessHandleRespDto addTaskCategoriesBusinessHandleRespDto_1 =null;
//步骤0: D1新增任务分类业务处理 - addTaskCategoriesBusinessHandle
     AddTaskCategoriesBusinessHandleRespDto addTaskCategoriesBusinessHandleRespDto = null;
    AddTaskCategoriesBusinessHandleReqDto addTaskCategoriesBusinessHandleReqDto=new AddTaskCategoriesBusinessHandleReqDto();
  if(reqDto!=null){
      addTaskCategoriesBusinessHandleReqDto.setThemeCode(reqDto.getThemeCode());//SimpleFieldAssign//sourceId:1952448_1
addTaskCategoriesBusinessHandleReqDto.setTypeDictionaryName(reqDto.getTypeDictionaryName());//SimpleFieldAssign//sourceId:1952449_1
addTaskCategoriesBusinessHandleReqDto.setOrganizationId(reqDto.getOrganizationId());//SimpleFieldAssign//sourceId:1952450_1
addTaskCategoriesBusinessHandleReqDto.setLevelNumber(reqDto.getLevelNumber());//SimpleFieldAssign//sourceId:1952451_1
addTaskCategoriesBusinessHandleReqDto.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:1952452_1
addTaskCategoriesBusinessHandleReqDto.setParentTypeDictionaryCode(reqDto.getParentTypeDictionaryCode());//SimpleFieldAssign//sourceId:1952453_1
    }

    /*D1新增任务分类业务处理[10025]   */
    Assert.isNull(addTaskCategoriesBusinessHandleReqDto.getThemeCode(),"B1新增任务分类(管理)-D1新增任务分类业务处理-主题标识不能为空",false);
Assert.isNull(addTaskCategoriesBusinessHandleReqDto.getTypeDictionaryName(),"B1新增任务分类(管理)-D1新增任务分类业务处理-类型字典名称不能为空",false);
Assert.isNull(addTaskCategoriesBusinessHandleReqDto.getOrganizationId(),"B1新增任务分类(管理)-D1新增任务分类业务处理-组织ID不能为空",false);
Assert.isNull(addTaskCategoriesBusinessHandleReqDto.getLevelNumber(),"B1新增任务分类(管理)-D1新增任务分类业务处理-层级不能为空",false);
Assert.isNull(addTaskCategoriesBusinessHandleReqDto.getSubjectLifeCycle(),"B1新增任务分类(管理)-D1新增任务分类业务处理-主体生命周期不能为空",false);
      addTaskCategoriesBusinessHandleRespDto = fwBaseOrgDictionaryClient.addTaskCategoriesBusinessHandle(addTaskCategoriesBusinessHandleReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


      addTaskCategoriesBusinessHandleRespDto_1 = addTaskCategoriesBusinessHandleRespDto;

BffAddTaskCategoriesRespDto retData = new BffAddTaskCategoriesRespDto();
  if(addTaskCategoriesBusinessHandleRespDto_1!=null){
      retData.setTypeDictionaryId(addTaskCategoriesBusinessHandleRespDto_1.getTypeDictionaryId());//SimpleFieldAssign//sourceId:1952462_1
    }




return retData;
  }
    //
}
